home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
cppdll
/
fontsel.h
< prev
next >
Wrap
Text File
|
1990-02-14
|
4KB
|
52 lines
/****************************************************************************
* *
* Font Selector by A.P.Mazur Jun 15,1989 *
* APM Labs *
* 511 Dix Way *
* San Jose, CA 95125 *
* All rights reserved. Copyright 1989-1990. *
* *
* This module allows the caller to select one of the fonts *
* available for given Display Context. SelectFont() function accepts *
* five parameters: *
* hParent : handle to a parent window *
* When dialog is finished hParent is activated. *
* hDC : Caller supplied Display Context. *
* Usualy hDC = GetDC(hParent) *
* pitch : if set to FIXED_PITCH only fixed fonts are shown *
* if set to VARIABLE_PITCH only variable fonts are shown *
* to see all fonts use FIXED_FONT | VARIABLE_FONT *
* pFont : pointer to the LOGFONT data structure. If the dialog *
* terminates with an OK message LOGFONT structure will be *
* filled with the current font description, otherwise the *
* LOGFONT structure remains unchanged. *
* NOTE: Once APPLY action is performed a LOGFONT structure *
* becomes permanently changed and CANCEL action is disabled*
* applyMessage : a message to be sent to the parent window in order to *
* notify about font change. If set to 0 no notification * *
* takes place, otherwise a message : *
* Send(hParent,WM_COMMAND,applyMessage,0L); *
* will be executed each time user changes a font. *
* NOTE: Sending notification disables a Cancel button. *
* SelectFont returns one of following codes: *
* *
* -1 : Insufficient memory to create the dialog box. *
* 1 : A new font was accepted by the user. The LOGFONT structure *
* is updated. *
* 2 : The dialog was canceled by the user. The LOGFONT structure *
* remains unchanged. *
* 3 : The Font Selector was "busy". Since a font selector is NOT *
* reentrant it can't be used simultaneously with two windows. *
* A second invocation will display a message box with the *
* information on which application is using a Font Selector, *
* when dissmised it will return 3. *
* *
****************************************************************************/
/* imports from fontsel.c module */
extern int FAR PASCAL SelectFont(HWND parentWindow,
HDC hdc,
BYTE pitch,
LOGFONT FAR *lpFont,
WORD applyMessage);